//
//  L9Logger.h
//  Lesson109
//
//  Created by 徐盟 on 2023/3/6.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface XMLogger : NSObject

@property(nonatomic, copy) NSString *scopeName;
@property(nonatomic, assign) BOOL isOpen;

- (instancetype) initWithScopeName:(NSString *) scopeName;

+(instancetype) loggerWithScopeName:(NSString *) scopeName;

-(void)open;
-(void)close;

-(void) log:(NSString *)format,...;
-(void) logv:(NSString *)format args:(va_list) args;

+(NSString *) formatArray:(NSArray*) arr;
+(NSString *) formatDictionary:(NSDictionary*) dict;
+(void) log:(NSString *)format,...;
-(void (^)(NSString *format,...)) log;
@end

NS_ASSUME_NONNULL_END
